package cn.lili.controller.promotion;

import cn.lili.common.utils.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.promotion.entity.dos.TicketOrder;
import cn.lili.modules.promotion.service.TicketOrderService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "门票订单接口")
@RequestMapping("/promotion/ticket/order")
@RequiredArgsConstructor
public class TicketOrderController {

    private final TicketOrderService ticketOrderService;

    @ApiOperation(value = "分页查询门票订单")
    @GetMapping
    public ResultMessage<Page<TicketOrder>> getPage(TicketOrder queryParam, PageVO page) {
        return ResultUtil.data(ticketOrderService.getByPage(queryParam, page));
    }
}
